﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using Sharp.DataTransferObject;
using Sharp.Portal;
using Sharp.Portal.AdminLTE;
using Sharp.Portal.Interface;
using Sharp.Portal.Mvc;
using Sharp.Portal.Mvc.Form;
using Sharp.Portal.Mvc.Models;

namespace Sharp.WebBooter.Areas.Platform.Models
{
    [ItemPage(OpenWith = OpenWith.Window2Column)]
    public partial class EmployeeModel : ISharpForm
    {
        public EmployeeModel()
        {
            UI = new BSSharpFrom(this)
            {
                LargeSize = true
            };
            OrgIdDataSource = new zTreeNode();
        }

        [HiddenInput]
        public int Id { get; set; }

        /// <summary>
        /// 工号
        /// </summary>
        [Display(Name = "工号", Order = 0)]
        public string Code { get; set; }

        /// <summary>
        /// 全名
        /// </summary>
        [Display(Name = "全名", Order = 1), Required]
        public string FullName { get; set; }

        /// <summary>
        /// 姓名简拼
        /// </summary>
        [Display(Name = "简拼", Order = 2)]
        public string Jianpin { get; set; }
        /// <summary>
        /// 身份证
        /// </summary>
        [Display(Name = "身份证", Order = 2)]
        public string IdCard { get; set; }
        /// <summary>
        /// 出生年月
        /// </summary> 
        [Display(Name = "出生年月", Order = 2)]
        public string Birthday { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        [Display(Name = "性别"), MasterData("Gender")]
        public string GenderCode { get; set; }
        /// <summary>
        /// 民族编码
        /// </summary> 
        [Display(Name = "民族编码"), MasterData("Nation")]
        public string NationCode { get; set; }
        /// <summary>
        /// 手机
        /// </summary>
        [Display(Name = "手机", Order = 3), DataType(DataType.PhoneNumber)]
        public string Phone { get; set; }

        /// <summary>
        /// 传真
        /// </summary>
        [Display(Name = "传真", Order = 4)]
        public string Fax { get; set; }

        /// <summary>
        /// 电子邮件
        /// </summary>
        [Display(Name = "电子邮件"), DataType(DataType.EmailAddress)]
        public string Email { get; set; }

        /// <summary>
        /// 家庭地址
        /// </summary>
        [Display(Name = "家庭地址")]
        public string Address { get; set; }


        /// <summary>
        /// 户籍
        /// </summary>
        [Display(Name = "户籍")]
        public string RegisteredResidence { get; set; }

        /// <summary>
        /// 参加工作
        /// </summary>
        [Display(Name = "参加工作")]
        public string WorkDate { get; set; }

        /// <summary>
        /// 职务
        /// </summary>
        [Display(Name = "职务")]
        public string JobTitle { get; set; }

        /// <summary>
        /// 婚姻状况
        /// </summary>
        [Display(Name = "婚姻状况"), MasterData("Married")]
        public string MarriedCode { get; set; }

        /// <summary>
        /// 学历
        /// </summary>
        [Display(Name = "学历"), MasterData("EducationalBackground")]
        public string EducationalBackgroundCode { get; set; }

        /// <summary>
        /// 紧急联系人
        /// </summary>
        [Display(Name = "紧急联系人")]
        public string UrgentContact { get; set; }

        /// <summary>
        /// 紧急联系电话
        /// </summary>
        [Display(Name = "紧急联系电话")]
        public string UrgentPhone { get; set; }

        /// <summary>
        /// 任职状况
        /// </summary>
        [Display(Name = "任职状况"), MasterData("PostState")]
        public string PostStateCode { get; set; }

        /// <summary>
        /// 职称
        /// </summary>
        [Display(Name = "职称"), MasterData("Posttitle")]
        public string PosttitleCode { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Display(Name = "备注"), DataType(DataType.MultilineText)]
        public string Remark { get; set; }

        [Display(Name = "归属部门", Order = 5), CustomField(FieldType.OrgTreeList)]
        public Guid? OrgId { get; set; }
        /// <summary>
        /// 所属组织
        /// </summary>
        public zTreeNode OrgIdDataSource { get; set; }

        /// <summary>
        /// 岗位
        /// </summary>
        public virtual JobDTO Job { get; set; }



        public SharpFrom UI { get; set; }

    }

}